package com.jiage.toolutil;

import android.content.Context;

import com.jiage.sp.SDSpManager;

public class ToolManager {
    private static ToolManager mInstance;

    public static ToolManager getInstance() {
        if (mInstance == null) {
            synchronized (ToolManager.class) {
                if (mInstance == null) {
                    mInstance = new ToolManager();
                }
            }
        }
        return mInstance;
    }

    /**
     * 初始化
     * @param context
     * @return
     */
    public ToolManager init(Context context){
        SDSpManager.getInstance().init(context);
        return this;
    }

    /**
     * 设置默认背景
     * @param trueBgRid
     * @param falseBgRid
     * @return
     */
    public ToolManager EditTextAllNullUtil(int trueBgRid, int falseBgRid){
        SDSpManager.getInstance().putInt("trueBg",trueBgRid);
        SDSpManager.getInstance().putInt("falseBg",falseBgRid);
        return this;
    }
}
